# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=audacious
pkgver=4.0.5
pkgrel=0
pkgdesc="A playlist-oriented media player with multiple interfaces"
url="https://audacious-media-player.org/"
arch="all !s390x"
license="BSD-2-Clause AND ISC"
depends_dev="dbus-glib-dev qt5-qtbase-dev"
makedepends="$depends_dev libxml2-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-dbg"
source="http://distfiles.audacious-media-player.org/$pkgname-$pkgver.tar.bz2"

case "$CARCH" in
mips*)	options="!check";;
esac

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--enable-chardet \
		--disable-valgrind \
		--enable-dbus \
		--disable-gtk \
		--enable-qt
	make
}

check() {
	cd "$builddir"/src/libaudcore/tests
	make test
	./test
}

package() {
	DESTDIR="$pkgdir" make install
}

sha512sums="4be7ebeee937f9b29931a28e1d80782b9df8beec70eab3917f5adccd0bf02aa6003a5b8361359b792edac2d2f31a257b853db43d59dd0674e5a3fbec7e7c1e46  audacious-4.0.5.tar.bz2"
